This page last changed on Jan 19, 2005 by ross.

Endpoints are used to connect to components in the server and external systems or to each other locally or over the network. An Endpoint is a specific channel through which two parties can communicate. A provider can be used to send or receive events from disparate systems, for example, a purchasing component may receive an order request over Http. Once the order has been processed by the component a Jms message may be sent over a topic to notify an auditing system and response sent back over Http.


An Endpoint consists of the following elements -

  1. Endpoint URI - at the very least an endpoint will have an Endpoint URI; an address that is used to reference a resource or service either locally or remotely. This must be a valid URI.
  2. Connector - used to connect to the underlying transport. Often the connector is not explicitly set, instead the connector for the endpoint is found based on the scheme of the Endpoint URI.
  3. Filter - a filter to apply to messages being recieved on the endpoint. See the Transports Guide for information about filtering support for a specific transport.
  4. Transaction - Transactions can be begun or committed when an event is received or sent. See the Transports Guide for information about transactionsupport for a specific transport.
  5. Properties - These can be set to override certain properties on the connector for this endpoint instance. For example, when using a smtp endpoint you may want to overload the from address.

Essentially, an endpoint is a configuration entity used to control how events are sent and received in Mule. Mule also has a notion of 'Transport Providers' or 'Providers' that do the actual work of sending a recieving events over various protocols.

Transport Elements

A Transport Provider is in fact a composite of a set of objects used to connect and communicate with the underlying system. The elements of a Transport Provider are -

  • Connector, is responsible for connecting to the underlying system
  • Message Receiver, is used to receive events from the system.
  • Connector Dispatchers, are responsible for passing data to the system.
  • Transformers are Transport specific transformers used to convert data received and data sent.

The following shows how an endpoint and underlying Transport components fit together.

Cannot resolve external resource into attachment.

Endpoint Usage

Endpoints can be configured on various objects in Mule -

  • Inbound Routers - configured on Components and allow one or more endpoints to be registered on a component.
  • Outbound Routers - configured on components and allow one or more outbound endpoints to be configured (with additional logic for controlling which endpoints are used for an event. See Message Routers)
  • Catch all strategies - allow a single 'catch-all' endpoint to be configured for a router.
  • Components - for convenience a single inbound and outbound endpoint can be set on the component directly, which is a little eaiser than configuring routers.
  • Exception Strategies - A single endpoint can be configured on an exception strategy to all events to be sent to an error endpoint.

Endpoints Scope

Endpoints can have two scopes; Global scope and local scope.

Global Scope

An Endpoint is considered to have Global scope when it is registered on the MuleManager instance or set in the Mule configuration as a <global-endpoint>.

Global endpoints can be referenced anywhere in your code. It's important to note that when an endpoint is requested from the UMOManager using the lookupendpoint() method, Mule actually returns a clone of the Endpoint. This allows client code to change any attibutes on the endpoint without affecting other objects in the system that also use the endpoint. The exception to this is the connector which is not cloned and setting properties on the connector at run-time may cause unpredictable results and is not recommended unless the documentation for the Transport says otherwise.

Local Scope

These are endpoints that are configured or set on the objects that have Endpoints, but are not registered with the MuleManager.

More Information

For more information about configuring endpoint see Configuring Endpoints. For reference about Transport Provider implementations see the Transports Guide.

Document generated by Confluence on Nov 27, 2006 10:27